export const namespace = "stadiumPerformance";
import { Image } from "antd";

export const calcColumns = (params) => {
  const { venueArr } = params;
  let enumlist = {};
  venueArr.forEach((v) => {
    enumlist[v.id] = {
      text: v.venueName,
    };
  });
  const columns = [
    {
      title: "手机号码",
      dataIndex: "tel",
    },
    {
      title: "员工姓名",
      dataIndex: "userNickName",
    },
    {
      dataIndex: "venueId",
      title: "所属场馆",
      valueEnum: enumlist,
    },
    {
      title: "员工角色",
      dataIndex: "userRoleName",
      hideInSearch: true,
    },
    {
      title: "计算周期",
      dataIndex: "countCycle",
      hideInSearch: true,
    },
    {
      title: "基准金额",
      dataIndex: "baseAmount",
      valueType: "money",
      hideInSearch: true,
    },
    {
      title: "提成方案",
      dataIndex: "commissionPlanName",
      hideInSearch: true,
    },

    {
      title: "提成金额",
      dataIndex: "commissionAmount",
      valueType: "money",
      hideInSearch: true,
    },
    {
      title: "生成时间",
      dataIndex: "ceatedTime",
      hideInSearch: true,
    },
  ];
  if (params?.operate) {
    columns.push(params?.operate);
  }
  return columns;
};
